Use GskRoundedRect instead.
void
_gtk_css_shadows_value_paint_box (const GtkCssValue *shadows,
cairo_t *cr,
- const GtkRoundedBox *padding_box,
+ const GskRoundedRect*padding_box,
gboolean inset)
{
guint i;
void
gtk_css_shadows_value_snapshot_outset (const GtkCssValue *shadows,
GtkSnapshot *snapshot,
- const GtkRoundedBox *border_box)
+ const GskRoundedRect*border_box)
{
guint i;
void
gtk_css_shadows_value_snapshot_inset (const GtkCssValue *shadows,
GtkSnapshot *snapshot,
- const GtkRoundedBox *padding_box)
+ const GskRoundedRect*padding_box)
{
guint i;
void _gtk_css_shadows_value_paint_box (const GtkCssValue *shadows,
cairo_t *cr,
- const GtkRoundedBox *padding_box,
+ const GskRoundedRect *padding_box,
gboolean inset);
void gtk_css_shadows_value_snapshot_outset (const GtkCssValue *shadows,
GtkSnapshot *snapshot,
- const GtkRoundedBox *border_box);
+ const GskRoundedRect *border_box);
void gtk_css_shadows_value_snapshot_inset (const GtkCssValue *shadows,
GtkSnapshot *snapshot,
- const GtkRoundedBox *padding_box);
+ const GskRoundedRect *padding_box);
void _gtk_css_shadows_value_get_extents (const GtkCssValue *shadows,
GtkBorder *border);
static void
draw_shadow (const GtkCssValue *shadow,
cairo_t *cr,
- GtkRoundedBox *box,
- GtkRoundedBox *clip_box,
+ GskRoundedRect *box,
+ GskRoundedRect *clip_box,
GtkBlurFlags blur_flags)
{
cairo_t *shadow_cr;
static void
draw_shadow_corner (const GtkCssValue *shadow,
cairo_t *cr,
- GtkRoundedBox *box,
- GtkRoundedBox *clip_box,
+ GskRoundedRect *box,
+ GskRoundedRect *clip_box,
GskCorner corner,
cairo_rectangle_int_t *drawn_rect)
{
gdouble radius, clip_radius;
int x1, x2, x3, y1, y2, y3, x, y;
- GtkRoundedBox corner_box;
+ GskRoundedRect corner_box;
cairo_t *mask_cr;
cairo_surface_t *mask;
cairo_pattern_t *pattern;
static void
draw_shadow_side (const GtkCssValue *shadow,
cairo_t *cr,
- GtkRoundedBox *box,
- GtkRoundedBox *clip_box,
+ GskRoundedRect *box,
+ GskRoundedRect *clip_box,
GtkCssSide side,
cairo_rectangle_int_t *drawn_rect)
{
void
_gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
cairo_t *cr,
- const GtkRoundedBox *padding_box)
+ const GskRoundedRect*padding_box)
{
- GtkRoundedBox box, clip_box;
+ GskRoundedRect box, clip_box;
double spread, radius, clip_radius, x, y, outside;
double x1c, y1c, x2c, y2c;
void
gtk_css_shadow_value_snapshot_outset (const GtkCssValue *shadow,
GtkSnapshot *snapshot,
- const GtkRoundedBox *border_box)
+ const GskRoundedRect*border_box)
{
GtkBorder extents;
cairo_t *cr;
void
gtk_css_shadow_value_snapshot_inset (const GtkCssValue *shadow,
GtkSnapshot *snapshot,
- const GtkRoundedBox *padding_box)
+ const GskRoundedRect*padding_box)
{
cairo_t *cr;
cairo_t *cr);
void _gtk_css_shadow_value_paint_box (const GtkCssValue *shadow,
cairo_t *cr,
- const GtkRoundedBox *padding_box);
+ const GskRoundedRect *padding_box);
void gtk_css_shadow_value_snapshot_outset (const GtkCssValue *shadow,
GtkSnapshot *snapshot,
- const GtkRoundedBox *border_box);
+ const GskRoundedRect *border_box);
void gtk_css_shadow_value_snapshot_inset (const GtkCssValue *shadow,
GtkSnapshot *snapshot,
- const GtkRoundedBox *padding_box);
+ const GskRoundedRect *padding_box);
G_END_DECLS
GtkAllocation allocation;
GtkStyleContext *context;
int x, y, w, h;
- GtkRoundedBox box;
+ GskRoundedRect box;
context = gtk_widget_get_style_context (widget);
gtk_widget_get_allocation (widget, &allocation);
double width,
double height)
{
- GtkRoundedBox box;
+ GskRoundedRect box;
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
struct _GtkThemingBackground {
GtkCssStyle *style;
- GtkRoundedBox boxes[N_BOXES];
+ GskRoundedRect boxes[N_BOXES];
};
static void
const GtkCssValue *pos, *repeat;
GtkCssImage *image;
GtkCssBlendMode blend_mode;
- const GtkRoundedBox *origin;
+ const GskRoundedRect *origin;
double image_width, image_height;
double width, height;
}
static void
-render_frame_fill (cairo_t *cr,
- GtkRoundedBox *border_box,
- const double border_width[4],
- GdkRGBA colors[4],
- guint hidden_side)
+render_frame_fill (cairo_t *cr,
+ GskRoundedRect *border_box,
+ const double border_width[4],
+ GdkRGBA colors[4],
+ guint hidden_side)
{
- GtkRoundedBox padding_box;
+ GskRoundedRect padding_box;
guint i, j;
padding_box = *border_box;
}
static void
-render_frame_stroke (cairo_t *cr,
- GtkRoundedBox *border_box,
- const double border_width[4],
- GdkRGBA colors[4],
- guint hidden_side,
- GtkBorderStyle stroke_style)
+render_frame_stroke (cairo_t *cr,
+ GskRoundedRect *border_box,
+ const double border_width[4],
+ GdkRGBA colors[4],
+ guint hidden_side,
+ GtkBorderStyle stroke_style)
{
gboolean different_colors, different_borders;
- GtkRoundedBox stroke_box;
+ GskRoundedRect stroke_box;
guint i;
different_colors = !gdk_rgba_equal (&colors[0], &colors[1]) ||
}
else
{
- GtkRoundedBox padding_box;
+ GskRoundedRect padding_box;
padding_box = *border_box;
_gtk_rounded_box_shrink (&padding_box,
}
static void
-render_border (cairo_t *cr,
- GtkRoundedBox *border_box,
- const double border_width[4],
- guint hidden_side,
- GdkRGBA colors[4],
- GtkBorderStyle border_style[4])
+render_border (cairo_t *cr,
+ GskRoundedRect *border_box,
+ const double border_width[4],
+ guint hidden_side,
+ GdkRGBA colors[4],
+ GtkBorderStyle border_style[4])
{
guint i, j;
break;
case GTK_BORDER_STYLE_DOUBLE:
{
- GtkRoundedBox other_box;
+ GskRoundedRect other_box;
double other_border[4];
guint dont_draw = hidden_side;
case GTK_BORDER_STYLE_GROOVE:
case GTK_BORDER_STYLE_RIDGE:
{
- GtkRoundedBox other_box;
+ GskRoundedRect other_box;
GdkRGBA other_colors[4];
guint dont_draw = hidden_side;
double other_border[4];
else
{
GtkBorderStyle border_style[4];
- GtkRoundedBox border_box;
+ GskRoundedRect border_box;
GdkRGBA colors[4];
/* Optimize the most common case of "This widget has no border" */
else
{
GtkBorderStyle border_style[4];
- GtkRoundedBox border_box;
+ GskRoundedRect border_box;
GdkRGBA colors[4];
/* Optimize the most common case of "This widget has no border" */
gdouble height)
{
GtkBorderStyle border_style[4];
- GtkRoundedBox border_box;
+ GskRoundedRect border_box;
double border_width[4];
GdkRGBA colors[4];
gdouble height)
{
GtkBorderStyle border_style[4];
- GtkRoundedBox border_box;
+ GskRoundedRect border_box;
double border_width[4];
GdkRGBA colors[4];
* The
**/
void
-_gtk_rounded_box_init_rect (GtkRoundedBox *box,
- double x,
- double y,
- double width,
- double height)
+_gtk_rounded_box_init_rect (GskRoundedRect *box,
+ double x,
+ double y,
+ double width,
+ double height)
{
- memset (box, 0, sizeof (GtkRoundedBox));
+ memset (box, 0, sizeof (GskRoundedRect));
box->bounds.origin.x = x;
box->bounds.origin.y = y;
/* clamp border radius, following CSS specs */
static void
-gtk_rounded_box_clamp_border_radius (GtkRoundedBox *box)
+gtk_rounded_box_clamp_border_radius (GskRoundedRect *box)
{
gdouble factor = 1.0;
gdouble corners;
}
static void
-_gtk_rounded_box_apply_border_radius (GtkRoundedBox *box,
+_gtk_rounded_box_apply_border_radius (GskRoundedRect *box,
GtkCssValue **corner,
GtkJunctionSides junction)
{
}
void
-_gtk_rounded_box_apply_border_radius_for_style (GtkRoundedBox *box,
+_gtk_rounded_box_apply_border_radius_for_style (GskRoundedRect *box,
GtkCssStyle *style,
GtkJunctionSides junction)
{
}
void
-_gtk_rounded_box_apply_outline_radius_for_style (GtkRoundedBox *box,
+_gtk_rounded_box_apply_outline_radius_for_style (GskRoundedRect *box,
GtkCssStyle *style,
GtkJunctionSides junction)
{
}
void
-_gtk_rounded_box_grow (GtkRoundedBox *box,
- double top,
- double right,
- double bottom,
- double left)
+_gtk_rounded_box_grow (GskRoundedRect *box,
+ double top,
+ double right,
+ double bottom,
+ double left)
{
if (box->bounds.size.width + left + right < 0)
{
}
void
-_gtk_rounded_box_shrink (GtkRoundedBox *box,
- double top,
- double right,
- double bottom,
- double left)
+_gtk_rounded_box_shrink (GskRoundedRect *box,
+ double top,
+ double right,
+ double bottom,
+ double left)
{
_gtk_rounded_box_grow (box, -top, -right, -bottom, -left);
}
void
-_gtk_rounded_box_move (GtkRoundedBox *box,
- double dx,
- double dy)
+_gtk_rounded_box_move (GskRoundedRect *box,
+ double dx,
+ double dy)
{
box->bounds.origin.x += dx;
box->bounds.origin.y += dy;
}
void
-_gtk_rounded_box_path (const GtkRoundedBox *box,
- cairo_t *cr)
+_gtk_rounded_box_path (const GskRoundedRect *box,
+ cairo_t *cr)
{
cairo_new_sub_path (cr);
}
double
-_gtk_rounded_box_guess_length (const GtkRoundedBox *box,
- GtkCssSide side)
+_gtk_rounded_box_guess_length (const GskRoundedRect *box,
+ GtkCssSide side)
{
double length;
GtkCssSide before, after;
}
void
-_gtk_rounded_box_path_side (const GtkRoundedBox *box,
- cairo_t *cr,
- GtkCssSide side)
+_gtk_rounded_box_path_side (const GskRoundedRect *box,
+ cairo_t *cr,
+ GtkCssSide side)
{
switch (side)
{
}
void
-_gtk_rounded_box_path_top (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr)
+_gtk_rounded_box_path_top (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr)
{
double start_angle, middle_angle, end_angle;
}
void
-_gtk_rounded_box_path_right (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr)
+_gtk_rounded_box_path_right (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr)
{
double start_angle, middle_angle, end_angle;
}
void
-_gtk_rounded_box_path_bottom (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr)
+_gtk_rounded_box_path_bottom (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr)
{
double start_angle, middle_angle, end_angle;
}
void
-_gtk_rounded_box_path_left (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr)
+_gtk_rounded_box_path_left (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr)
{
double start_angle, middle_angle, end_angle;
}
void
-_gtk_rounded_box_clip_path (const GtkRoundedBox *box,
- cairo_t *cr)
+_gtk_rounded_box_clip_path (const GskRoundedRect *box,
+ cairo_t *cr)
{
cairo_rectangle (cr,
box->bounds.origin.x, box->bounds.origin.y,
}
gboolean
-_gtk_rounded_box_intersects_rectangle (const GtkRoundedBox *box,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2)
+_gtk_rounded_box_intersects_rectangle (const GskRoundedRect *box,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2)
{
if (x2 < box->bounds.origin.x ||
y2 < box->bounds.origin.y ||
}
gboolean
-_gtk_rounded_box_contains_rectangle (const GtkRoundedBox *box,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2)
+_gtk_rounded_box_contains_rectangle (const GskRoundedRect *box,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2)
{
if (x1 < box->bounds.origin.x ||
y1 < box->bounds.origin.y ||
G_BEGIN_DECLS
-typedef GskRoundedRect GtkRoundedBox;
+void _gtk_rounded_box_init_rect (GskRoundedRect *box,
+ double x,
+ double y,
+ double width,
+ double height);
-void _gtk_rounded_box_init_rect (GtkRoundedBox *box,
- double x,
- double y,
- double width,
- double height);
+void _gtk_rounded_box_apply_border_radius_for_style (GskRoundedRect *box,
+ GtkCssStyle *style,
+ GtkJunctionSides junction);
-void _gtk_rounded_box_apply_border_radius_for_style (GtkRoundedBox *box,
- GtkCssStyle *style,
- GtkJunctionSides junction);
+void _gtk_rounded_box_apply_outline_radius_for_style (GskRoundedRect *box,
+ GtkCssStyle *style,
+ GtkJunctionSides junction);
-void _gtk_rounded_box_apply_outline_radius_for_style (GtkRoundedBox *box,
- GtkCssStyle *style,
- GtkJunctionSides junction);
+void _gtk_rounded_box_grow (GskRoundedRect *box,
+ double top,
+ double right,
+ double bottom,
+ double left);
+void _gtk_rounded_box_shrink (GskRoundedRect *box,
+ double top,
+ double right,
+ double bottom,
+ double left);
+void _gtk_rounded_box_move (GskRoundedRect *box,
+ double dx,
+ double dy);
-void _gtk_rounded_box_grow (GtkRoundedBox *box,
- double top,
- double right,
- double bottom,
- double left);
-void _gtk_rounded_box_shrink (GtkRoundedBox *box,
- double top,
- double right,
- double bottom,
- double left);
-void _gtk_rounded_box_move (GtkRoundedBox *box,
- double dx,
- double dy);
+double _gtk_rounded_box_guess_length (const GskRoundedRect *box,
+ GtkCssSide side);
-double _gtk_rounded_box_guess_length (const GtkRoundedBox *box,
- GtkCssSide side);
-
-void _gtk_rounded_box_path (const GtkRoundedBox *box,
- cairo_t *cr);
-void _gtk_rounded_box_path_side (const GtkRoundedBox *box,
- cairo_t *cr,
- GtkCssSide side);
-void _gtk_rounded_box_path_top (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr);
-void _gtk_rounded_box_path_right (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr);
-void _gtk_rounded_box_path_bottom (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr);
-void _gtk_rounded_box_path_left (const GtkRoundedBox *outer,
- const GtkRoundedBox *inner,
- cairo_t *cr);
-void _gtk_rounded_box_clip_path (const GtkRoundedBox *box,
- cairo_t *cr);
-gboolean _gtk_rounded_box_intersects_rectangle (const GtkRoundedBox *box,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2);
-gboolean _gtk_rounded_box_contains_rectangle (const GtkRoundedBox *box,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2);
+void _gtk_rounded_box_path (const GskRoundedRect *box,
+ cairo_t *cr);
+void _gtk_rounded_box_path_side (const GskRoundedRect *box,
+ cairo_t *cr,
+ GtkCssSide side);
+void _gtk_rounded_box_path_top (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr);
+void _gtk_rounded_box_path_right (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr);
+void _gtk_rounded_box_path_bottom (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr);
+void _gtk_rounded_box_path_left (const GskRoundedRect *outer,
+ const GskRoundedRect *inner,
+ cairo_t *cr);
+void _gtk_rounded_box_clip_path (const GskRoundedRect *box,
+ cairo_t *cr);
+gboolean _gtk_rounded_box_intersects_rectangle (const GskRoundedRect *box,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2);
+gboolean _gtk_rounded_box_contains_rectangle (const GskRoundedRect *box,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2);
G_END_DECLS